
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员中心-三帝贸易网</title>
<link href="../css/css.css" rel="stylesheet" type="text/css" /></head>
<script type="text/javascript" src="../js/left.js"></script>
<?php
$dis_id=7;
include("../../inc/conn.inc");
include("../islogin.php");
if($_POST[sent_act]){
@mysql_query("insert into note (from_id,to_id,n_subject,n_content,fujian_1,fujian_2,add_time) values ('$_POST[fromid]','$_POST[toid]','$_POST[n_subject]','$_POST[inquire_content]','$_POST[picture]','$_POST[picture2]','".date("Y-m-d H:i:s")."')");

       $mail_rs=@mysql_query("select m_user,m_email from member where id='$_POST[toid]'"); 
	   $mail_row=@mysql_fetch_array($mail_rs);
	  
	   
					 
					 $content=iconv("utf-8","gb2312","<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd'>
<HTML xmlns='http://www.w3.org/1999/xhtml'>
<HEAD>
<TITLE>邮件来自三帝贸易网</TITLE>
<META http-equiv=Content-Type content='text/html; charset=gb2312'>
<style type='text/css'>
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	font-size: 12px;
	FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
	background-color: #FFFFFF;
}
a:link {
	color: #003399;
	text-decoration: underline;
}
a:hover {
	color: #FF6600;
	text-decoration: underline;
}
a:active {
	color: #003399;
	text-decoration: underline;
}
a:visited {
	color: #003399;
	text-decoration: underline;
}



#mail {
	padding: 0px;
	width: 622px;
	margin-top: 0px;
	margin-right: auto;
	margin-bottom: 0px;
	margin-left: auto;
	border-right-width: 1px;
	border-left-width: 1px;
	border-right-style: solid;
	border-left-style: solid;
	border-right-color: #ECE9D8;
	border-left-color: #ECE9D8;
}
#mail .info .to {
	line-height: 22px;
}

#mail .info .title {
	font-family: Arial;
	font-size: 19px;
	padding: 5px;
	background-color: #EBEBEB;
}

#mail .logo {
	float: left;
	padding-top: 13px;
}
#mail .headbg {
	float: right;
}
#mail .info {
	padding: 10px;
}
#mail .info .note {
	background-color: #ECF3FB;
	padding: 5px;
	line-height: 18px;
}

#mail .foot {
	background-color: #7EB1DA;
	padding: 6px;
	text-align: right;
}

.onl {
	clear: both;
}
-->
</style>
</HEAD>
<BODY>
<div id='mail'>
<div class='logo'><img src='http://www.sandib2b.cn/images/logo.gif' width='388' height='60'></div>
<div class='headbg'><img src='http://www.sandib2b.cn/images/headbg.gif' width='220' height='75'></div>
<div class='onl'></div>
<table width='100%' border='0' cellpadding='0' cellspacing='0'>
  <tr>
    <td height='42' align='right' valign='bottom' background='http://www.sandib2b.cn/images/webbg.gif'><img src='http://www.sandib2b.cn/images/messbg.gif' width='257' height='28'></td>
    </tr>
</table>
<div class='info'>
  <table cellspacing='0' cellpadding='0' width='100%' align='center' border='0'>
    <tbody>
      <tr>
        <td width='593' height='300' valign='top'><div><strong>您好,"."$mail_row[m_user]"."</strong><div class='to'></div>
          <div class='title'>询价邮件</div>
          <table border='0' align='center' cellpadding='2' cellspacing='1' bgcolor='#FFFFFF'>
                  <tbody>
                    <tr>
                      <th width='123' height='25'>主题</th>
                      <td width='459' height='25'>".$_POST[n_subject]."</td>
                    </tr>
                    <tr bgcolor='#f7f7f7'>
                      <th>详细内容</th>
                      <td height='100' valign='top'>".substr($_POST[inquire_content],0,200)."...</td>
                    </tr>
					<tr bgcolor='#f7f7f7'>
                      <th height='35'>登陆</th>
                      <td><a href='http://www.sandib2b.cn/login'>http://www.sandib2b.cn/login</a></td>
                    </tr>
					<tr bgcolor='#f7f7f7'>
                      <th height='35'></th>
                      <td>警告：系统邮件请勿回复！</td>
                    </tr>
                  </tbody>
              </table>
          </div>
          </td>
      </tr>
    </tbody>
  </table>
</div>
<div class='foot'>国内专业网上商品贸易平台<font color='#CC0000'>三帝贸易网</font></div>
</div>
</BODY>
</HTML>");
					 
                   sendmail($mail_row['m_email'],"询价邮件来自三帝贸易网",$content);
                     //sent email end
	  


echo "<script>alert('发送成功');location='inbox.php'</script>";
}
?>
<body>
<div id="mian">
<?php include("../inc/top.php");?>
<div class="top1"><span>您当前位置：<a href="../index.php" class="dh">会员助手</a> &gt;&gt; 信箱管理 &gt;&gt; 收信箱</span></div>
<div class="left">
<?php include("../inc/left.php");?>
</div>
<div class="right">
  <TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
    <TR>
      <TD height="40" bgcolor="#EFF6FF" style="font-size:18px;font-weight:bold;padding-left:8px;">发邮件</TD>
    </TR>
  </TABLE>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#C1DCF5">
  <tr>
    <td height="45" colspan="2" align="left" bgcolor="#EFF6FF" style="padding:5px;"><a href="javascript:history.go(-1)">« 返回</a></td>
  </tr>
  <form method="post" action="reply_mail.php" name="form1" onSubmit="return checkform()">
  <tr>
    <td width="156" height="30" align="right" bgcolor="#EFF6FF"><strong>主题:</strong></td>
    <td width="566" bgcolor="#FFFFFF" style="padding-left:5px;"><input name="n_subject" id="n_subject" type="text" size="45" maxlength="1000" value="<?=$_GET[n_subject]?>" /></td>
  </tr>
  <tr>
    <td height="22" align="right" bgcolor="#EFF6FF"><strong>内容:</strong></td>
    <td bgcolor="#FFFFFF" style="padding-left:5px;"><textarea name="inquire_content" id="inquire_content" cols="50" rows="12"></textarea></td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#EFF6FF"><strong>附件1</strong></td>
    <td bgcolor="#FFFFFF" style="padding-left:5px;"><input name="picture" id="picture" type="text" size="35" maxlength="100">
&nbsp;&nbsp;<input name="button" type="button" onClick="window.open ('../upfile.php', 'newwindow', 'height=50, width=400, top=250, left=250, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')" value=" 上传附件 ">&nbsp;(附件类型：gif，jpg)</td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#EFF6FF"><strong>附件2</strong></td>
    <td bgcolor="#FFFFFF" style="padding-left:5px;"><input name="picture2" id="picture2" type="text" size="35" maxlength="100">
&nbsp;&nbsp;<input name="button" type="button" onClick="window.open ('../upfile2.php', 'newwindow', 'height=50, width=400, top=250, left=250, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')" value=" 上传附件 ">&nbsp;(附件类型：gif，jpg)</td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#EFF6FF">
	<input type="hidden" name="fromid" value="<?=$_GET[fromid]?>" />
	<input type="hidden" name="toid" value="<?=$_GET[toid]?>" />
	<input type="hidden" name="sent_act" value="ok" /></td>
    <td bgcolor="#FFFFFF" style="padding-left:5px;"><input type="submit" value=" 发 送 " /></td>
  </tr>
  </form>
</table>
</div>
<div class="onl"></div>
<?php include("../inc/foot.php");?>
</div>
</body>
</html>

<script language="javascript">
function $(id){
return document.getElementById(id);
}
function checkform(){
  if($("n_subject").value==""){
    alert("主题不能为空");
    return false;
  }
  if($("inquire_content").value==""){
    alert("内容不能为空");
    return false;
  }
}
</script>
